-- spell_add_migic
-- created by shuzy
-- 施放卷轴，增加魔力

return {
    apply = function(prop, baseValue)
        return prop[3];
    end,

    -- 触发
    trigger = function(who, prop, arg)
        BonusM.doBonus({2, "magic", prop[3],}, "prop spell_add_migic")

        -- 记一个临时字段，使用技能时等播完光效再刷新界面
        ME.user.dbase:setTemp("magic_bonus_delay", 1);

        -- 奖励事件
        EventMgr.fire(event.SKILL_BONUS, { ["bonus"] = {2, "magic", prop[3],}});
    end,

    desc = function(prop)
        local row = PropM.getRow(prop[1]);
        local desc = row.desc;
        return desc;
    end,

    record = function(target, prop, path)
        return false;
    end,
};